home *** CD-ROM | disk | FTP | other *** search
/ Eagles Nest BBS 6 / Eagles_Nest_Mac_Collection_Disc_6.TOAST / Windows / VBExamples / VB Examples.image / LOANIN.FRM (.txt) < prev    next >
Visual Basic Form  |  1991-07-08  |  10KB  |  253 lines

  1. LoanInpt
  2. Loan Calculator
  3. Form1
  4. Label3
  5. Term:
  6. Label1
  7. Principal:
  8. inPrinc
  9. inTerm
  10. Label2
  11.     Rate (%):
  12. inRate
  13. FileMenu
  14. &File
  15. PrintTableCommand
  16. &Print Table
  17. SaveTableCommand
  18. &Save Table
  19. ExitCommand
  20. E&xit
  21.     PrincMenu
  22. &Principal Increment
  23. $1,000
  24. $10,000
  25. $100,000
  26. RateMenu
  27. &Rate Increment
  28. 0.125%
  29. 0.25%
  30. 0.50%
  31. Text1D
  32. Text2v
  33. Combo1
  34. Command1
  35. Command2
  36. Command3&
  37. Picture1
  38. Picture2J
  39. Label1
  40. Label2
  41. Label3r
  42. Text1_Change
  43. Form_Click
  44. InPrinc
  45. InRate
  46. SaveTabl
  47. PrntTabl
  48. InTerm
  49. Options
  50. ExitButtonJ
  51. BadInputm
  52. Calc_Click
  53. TitleX
  54. CalculateTable
  55. CurPrincInc
  56. CurRateInc8
  57. @    ShowTable6
  58. Princb
  59. deltaP-
  60. yrRate
  61. deltaRl
  62. years
  63. StartPrinc
  64.     StartRatex
  65. paymentTable
  66. displayTable
  67. tempP
  68. tempRV
  69. PaymentT
  70. MoRate
  71. Months
  72. LoanTabl
  73. FontName=
  74. FontSize
  75. FontBold
  76. False
  77. OutTable
  78. @    Form_Load
  79. LoanOpts
  80. PrntTabl_Click
  81. Printer
  82. TempStr
  83. spLenE
  84. Options_Click0
  85. ExitButton_Click
  86. OutDest
  87. SaveTabl_Clickz
  88. LoanInpta
  89. Frame1
  90. Frame2
  91. OkOptsb
  92.     princMenu
  93. princInc
  94. rateMenu
  95. rateIncr%
  96. outMenu{
  97. dest8
  98. princInc_Click
  99. Index
  100. Value
  101. rateIncr_Click
  102. Label1_Click
  103. dest_Click
  104. Check
  105. CheckedC
  106. Rateo
  107. ExitOpt
  108. ExitOpt_ClickW
  109. PrintTableR
  110.     SaveTablek
  111. PrintTable_Click.
  112. SaveTable_Click
  113. MenuPrintTable
  114. MenuSaveTable
  115. MenuPrintTable_Click
  116. MenuSaveTable_Click
  117. inTerm_Change
  118. FileMenu
  119. PrintTableCommand
  120. SaveTableCommand
  121. ExitCommandr
  122.     FormTable
  123. PRange
  124. RRange
  125. RJust
  126. InStringl
  127.     JustWidth
  128. PrintTableCommand_Click
  129. SaveTableCommand_Click
  130. FileName
  131. ExitCommand_Click
  132. PInc_Click
  133. RInc_Click,
  134. SelectWholeText
  135.     InTextBox
  136. SelStart
  137.     SelLengthY
  138. InPrinc_GotFocus
  139. InRate_GotFocus
  140. inRate_DragDrop
  141. Calc_GotFocus
  142. ReadCommandLine
  143. InLine
  144. FirstSpace
  145. SecondSpace
  146. GetFocus
  147.  LoanInpt.FRMM
  148.  Declarationss
  149.  Define True and False constants..
  150.  Declare output table arrays.n
  151.  Declare flag for input errors.
  152.  Declare increment variables
  153.  End of declarations for LoanInpt.FRM
  154. Form_Load
  155.  Build the drop-down list for
  156.  the Term combo box.
  157. 4 years"
  158. 5 years"
  159. 10 years
  160. 15 years
  161. 20 years
  162. 30 years
  163.  Initialize the increment values.d
  164.  Read the user-supplied command line.n
  165.  Form_Load    
  166. Calc_Click
  167.  Produce the output table when
  168.  the user clicks the Calc button. 
  169.  Read the input values and convert them to numbers.)
  170.  Check for input errors or missing values,
  171.  and display an error message if necessary.
  172. Input values are not valid."
  173. Loan Parameters"
  174.  If input is OK, calculate and display the loan table.
  175.  Calc_Clicki    
  176. CalculateTable
  177.  Build the payment table in the output arrays:
  178.    -- FormTable$ is the for displaying the table.%
  179.    -- OutTable$ is for printing and saving the table.%
  180.  Calculate the starting principal and rate for the
  181.  table, given the current increment values.f
  182.  Compute the first column and row of the table.t
  183. $#,######"
  184. 0.00%"
  185.  Fill in the rest of the table.
  186. $#,####.00
  187.  CalculateTable
  188. ShowTable
  189.  Display the payment table in the LoanTabl form.
  190.  Output widths. 
  191. Tms Rmn"
  192.  Special treatment for the target"
  193.  payment amount, displayed in bold.
  194.  ShowTable    
  195. RJust
  196.  Right-justify a string within a width.
  197.  RJust$
  198. PrintTableCommand_Click
  199.  Print the payment table.1
  200.  PrintTableCommand_Click    
  201. SaveTableCommand_Click
  202.  Save the table as a text file.t
  203. LoanTemp.Txt
  204.  SaveTableCommand_Click#    
  205. ExitCommand_Click
  206.  Terminate the program performance.b
  207.  ExitCommand_Click    
  208. PInc_Click
  209.  Calculate the principal increment
  210.  value, using the Index number of the*
  211.  currently selected option button.
  212.  Uncheck the old option and check the new.
  213.  Recalculate the table.l
  214.  PInc_Click     
  215. RInc_Click
  216.  Determine the rate increment value,
  217.  using the Index number of the currently
  218.  selected option button.
  219.  Uncheck the old option and check the new.
  220.  Recalculate the table.l
  221.  RInc_Click     
  222. Payment
  223.  Calculate the monthly payment.M
  224.  Payment
  225. SelectWholeText
  226.  Highlight current entry when thes
  227.  user selects a text box.w
  228.  SelectWholeText    
  229. InPrinc_GotFocus
  230.  Highlight current entry when.
  231.  text box is selected.
  232.  InPrinc_GotFocus
  233. InRate_GotFocus
  234.  Highlight current entry when
  235.  text box is selected.
  236.  InRate_GotFocus    
  237. ReadCommandLine
  238.  Read the user-supplied command line. 
  239.  The line should be in the format:
  240.  principal rate term
  241.  where one or more spaces separate eacha
  242.  numeric data item. This routine ignores
  243.  any command line that does not conformo
  244.  to this format. $
  245.  Continue only if InLine is not blank.
  246.  Find locations of two space-character a
  247.  separators. Eliminate any extra spaces.
  248.  Continue only if separators are present..
  249.  Enter the loan parameters from the command line.d
  250.  Use Val and Str$ to convert any non-numeric n
  251.  input value into "0".
  252.  ReadCommandLine    
  253.